﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

using Weazel.Badger.Vhdl.Types;

namespace Weazel.Badger.Vhdl.Operators.Binary
{
  public class And : BinaryFunction
  {
    private static BinaryTypeMap[] typeMaps = new BinaryTypeMap[]
      {
        new BinaryTypeMap(Types.Types.StdLogicVector, Types.Types.StdLogicVector, Types.Types.StdLogicVector),
        new BinaryTypeMap(Types.Types.StdLogicVector, Types.Types.StdLogicVector, Types.Types.Boolean, true),
        new BinaryTypeMap(Types.Types.StdLogic, Types.Types.StdLogic, Types.Types.StdLogic),
        new BinaryTypeMap(Types.Types.Boolean, Types.Types.Boolean, Types.Types.Boolean)
      };

    public override BinaryTypeMap[] SignedTypeMaps
    {
      get
      {
        return typeMaps;
      }
    }

    public override BinaryTypeMap[] UnsignedTypeMaps
    {
      get
      {
        return typeMaps;
      }
    }

    public And()
    {
    }


    public override string ToString(string left, string right, int width)
    {
      return string.Format("{0} and {1}", left, right);
    }

  }
}
